package com.azure.apachedubbo.properties.consumer.controller;

import com.azure.apachedubbo.api.service.DemoUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: liuhuaibin
 * @Date: 2019/9/26 11:45
 * @Description:
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    //@Reference(version = "1.0", url = "dubbo://127.0.0.1:20888")
    @Reference(version = "1.0", group = "annotation")
    private DemoUserService demoUserService;

    @RequestMapping("")
    public List<String> demo(){
        List<String> all = demoUserService.findAll();
        return all;
    }
}
